package com.fish.sqlSession;

import java.util.List;

public interface Sqlsession {

    /**
     * 查询列表
     * @param <E>
     * @return
     */
    public <E> List<E> selectList(String statementid,Object... params) throws Exception;

    /**
     * 查询单条
     * @param <T>
     * @return
     */
    public <T> T selectOne(String statementid,Object... params) throws Exception;

    /**
     * 生成代理Mapper
     * @param mapperClass
     * @param <T>
     * @return
     */
    public <T> T getMapper(Class<?> mapperClass);

    /**
     * 增加
     * @param statementid
     * @param params
     * @return
     * @throws Exception
     */
    public boolean insert(String statementid,Object... params) throws Exception;

    /**
     * 修改
     * @param statementid
     * @param params
     * @return
     * @throws Exception
     */
    public int update(String statementid,Object... params) throws Exception;

    /**
     * 删除
     * @param statementid
     * @param params
     * @return
     * @throws Exception
     */
    public boolean delete(String statementid,Object... params) throws Exception;
}
